fix(tables): enrichment sidebar column-id display + filter-scoped run menu#5459
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
PR SummaryMedium Risk Overview Separately, workflow-group run actions from the grid header now apply the active table filter for table-scoped modes (run all / empty / N empty), while run selected still uses explicit row ids. Run menu labels switch to “filtered rows” when a filter is active so the scope is obvious. Reviewed by Cursor Bugbot for commit 299c13f. Bugbot is set up for automated code reviews on this repo. Configure here. |
Greptile SummaryThis PR fixes two independent bugs in the tables feature: (1) the enrichment configuration sidebar was seeding its edit state directly from raw
Confidence Score: 5/5Both fixes are narrowly scoped and self-consistent; the enrichment config correctly threads column-ID resolution throughout all edit-mode paths, and the filter propagation mirrors the existing context-menu select-all pattern. The enrichment sidebar fix resolves each ID reference through columnMatchesRef before seeding state, correctly seeds display names for the output name field, and targets stable IDs on rename — all three failure modes from the bug description are addressed in concert. The filter fix in handleRunColumn follows the exact pattern already used in the context menu's runSelection path, and the single WorkflowGroupMetaCell render site in table-grid.tsx receives the new prop. No regressions are visible in the changed paths. No files require special attention. Important Files Changed
Sequence Diagram%%{init: {'theme': 'neutral'}}%%
sequenceDiagram
participant User
participant MetaCell as WorkflowGroupMetaCell
participant Grid as TableGrid.handleRunColumn
participant Prop as onRunColumn (prop)
participant Server
Note over MetaCell: hasActiveFilter prop now passed from TableGrid
User->>MetaCell: Click "Run all rows" (filter active)
MetaCell->>Grid: onRunColumn(groupId, 'all')
Note over Grid: rowIds is undefined, derive filter
Grid->>Grid: "filter = queryOptions.filter ?? undefined"
Grid->>Prop: onRunColumn(groupId, 'all', undefined, undefined, filter)
Prop->>Server: Run scoped to matching rows
User->>MetaCell: Click "Run N selected rows"
MetaCell->>Grid: onRunColumn(groupId, 'all', selectedRowIds)
Note over Grid: rowIds present, filter = undefined
Grid->>Prop: onRunColumn(groupId, 'all', selectedRowIds, undefined, undefined)
Prop->>Server: Run scoped to explicit row IDs
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
sequenceDiagram
participant User
participant MetaCell as WorkflowGroupMetaCell
participant Grid as TableGrid.handleRunColumn
participant Prop as onRunColumn (prop)
participant Server
Note over MetaCell: hasActiveFilter prop now passed from TableGrid
User->>MetaCell: Click "Run all rows" (filter active)
MetaCell->>Grid: onRunColumn(groupId, 'all')
Note over Grid: rowIds is undefined, derive filter
Grid->>Grid: "filter = queryOptions.filter ?? undefined"
Grid->>Prop: onRunColumn(groupId, 'all', undefined, undefined, filter)
Prop->>Server: Run scoped to matching rows
User->>MetaCell: Click "Run N selected rows"
MetaCell->>Grid: onRunColumn(groupId, 'all', selectedRowIds)
Note over Grid: rowIds present, filter = undefined
Grid->>Prop: onRunColumn(groupId, 'all', selectedRowIds, undefined, undefined)
Prop->>Server: Run scoped to explicit row IDs
Reviews (2): Last reviewed commit: "feat(tables): scope group-header run men..." | Re-trigger Greptile |
|
@greptile review |
Summary
workflowGroup.outputs[].columnName/inputMappings[].columnNamepersist the stable column id (col_…), but the enrichment config sidebar seeded its edit state straight from those refs — reopening a saved enrichment showed the raw column id in the Output Columns name field, input-mapping selections didn't resolve, and retyping the real column name falsely tripped "Column already exists". Fixed by resolving refs viacolumnMatchesRef, keying combobox options bygetColumnId, seeding display names, and targeting renames at the stable idType of Change
Testing
Tested manually against the staging repro table; type-check, lint:check, check:api-validation:strict, and enrichment/column-keys vitest suites pass
Checklist